<?php


namespace app\commands;


use app\models\CronTask;
use app\Utils\LogUtil;
use app\Utils\ProcessUtil;
use yii\console\Controller;
use Swoole\Timer;
class CronController extends Controller
{

    public function actionRun()
    {

        /*Timer::tick(1000, function(){
            echo "timeout\n";
        });*/
        //ProcessUtil::signal();
        //ProcessUtil::create_process(['a' => 1]);
        $cron = new CronTask();
        $arr = $cron->getTask();
        foreach ($arr as $item)
        {
            var_dump($item);
        }
    }

}